-- GENERATED SPELL FOR [Scarlet Magician] --


function spell0_4282(pUnit, Event) --@Fire Ward,Self--
pUnit:FullCastSpellOnTarget(8457,pUnit)
pUnit:RegisterEvent('Sorts_4282', 30000, 1)
end

function spell1_4282(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4282', 3000, 1)
end

function Sorts_4282(pUnit, Event)
local choix_sorts_4282 = math.random(0, 1)
if choix_sorts_4282 == 0 then
pUnit:RegisterEvent('spell0_4282', 1, 1)
end
if choix_sorts_4282 == 1 then
pUnit:RegisterEvent('spell1_4282', 1, 1)
end
end

function mob4282_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4282', math.random(1500, 3000), 1)
end

function mob4282_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4282_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4282_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4282, 1, 'mob4282_Action')
RegisterUnitEvent(4282, 2, 'mob4282_Leave')
RegisterUnitEvent(4282, 3, 'mob4282_Kill')
RegisterUnitEvent(4282, 4, 'mob4282_Die')
